package it.secse.idmadaption.viewer;

import java.awt.BorderLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;


@SuppressWarnings("serial")
public class AdaptionViewer extends javax.swing.JFrame {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	
	private static AdaptionViewer instance = null;

	private JPanel jPanel1;
	private JLabel jLabel3;
	private JLabel jLabel4;
	private JScrollPane jScrollPane1;
	private JLabel jLabel14;
	private JLabel jLabel13;
	private JLabel jLabel12;
	private JLabel jLabel5;
	private JScrollPane jScrollPane2;
	private JLabel jLabel10;
	private JLabel jLabel8;
	private JLabel jLabel7;
	private JLabel jLabel6;
	private JScrollPane jScrollPane4;
	private JScrollPane jScrollPane3;
	private JLabel jLabel2;
	private JTextArea jTextArea4;
	private JLabel jLabel1;
	private JTextArea jTextArea3;
	private JTextArea jTextArea2;
	private JTextArea jTextArea1;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {

			public void run() {
				
			}
		});
	}
	
	private AdaptionViewer() { 
		super();
		initGUI();				
		super.setTitle("IDM Adaption Process Graphical View - Operation(s): ");
		try {
			Thread.sleep(100);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		super.setVisible(true);
		jPanel1.setVisible(true);
	}
	
	public static AdaptionViewer getInstance() {
		if(instance == null) {
			instance = new AdaptionViewer();
			try {
				Thread.sleep(500);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		return instance;
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setPreferredSize(new java.awt.Dimension(1254, 776));
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1, BorderLayout.CENTER);
				jPanel1.setLayout(null);
				jPanel1.setPreferredSize(new java.awt.Dimension(1031, 494));
				jPanel1.setAutoscrolls(true);
				{
					jScrollPane1 = new JScrollPane();
					jPanel1.add(jScrollPane1);
					jScrollPane1.setPreferredSize(new java.awt.Dimension(3, 3));
				}
				{
					jScrollPane3 = new JScrollPane();
					jPanel1.add(jScrollPane3);
					jScrollPane3.setBounds(24, 413, 500, 300);
					{
						jTextArea3 = new JTextArea();
						jScrollPane3.setViewportView(jTextArea3);
					}
				}
				{
					jScrollPane4 = new JScrollPane();
					jPanel1.add(jScrollPane4);
					jScrollPane4.setBounds(623, 414, 500, 300);
					{
						jTextArea4 = new JTextArea();
						jScrollPane4.setViewportView(jTextArea4);
					}
				}
				{
					jScrollPane2 = new JScrollPane();
					jPanel1.add(jScrollPane2);
					jScrollPane2.setBounds(623, 35, 500, 300);
					{
						jTextArea2 = new JTextArea();
						jScrollPane2.setViewportView(jTextArea2);
					}
				}
				{
					jLabel1 = new JLabel();
					jPanel1.add(jLabel1);
				}
				{
					jLabel2 = new JLabel();
					jPanel1.add(jLabel2);
				}
				{
					jLabel4 = new JLabel();
					jLabel4.setText("Secured Response:");
				}
				{
					jLabel3 = new JLabel();
					jPanel1.add(jLabel3);
					jPanel1.add(jLabel4);
					jLabel1.setBounds(24, 12, 500, 15);
					jLabel1.setText("Client Request: ");
					{
						jLabel5 = new JLabel();
						jPanel1.add(jLabel5);
						jLabel5.setText("------->");
						jLabel5.setBounds(546, 187, 70, 15);
					}
					{
						jLabel6 = new JLabel();
						jPanel1.add(jLabel6);
						jLabel6.setText("Process...");
						jLabel6.setBounds(542, 172, 100, 15);
					}
					{
						jLabel7 = new JLabel();
						jPanel1.add(jLabel7);
						jLabel7.setText("<-------");
						jLabel7.setBounds(542, 554, 70, 15);
					}
					{
						jLabel8 = new JLabel();
						jPanel1.add(jLabel8);
						jLabel8.setText("Porcess...");
						jLabel8.setBounds(542, 539, 70, 15);
					}
					{
						jLabel10 = new JLabel();
						jPanel1.add(jLabel10);
						jLabel10.setText("------->");
						jLabel10.setBounds(1161, 187, 66, 15);
					}
					{
						jLabel12 = new JLabel();
						jPanel1.add(jLabel12);
						jLabel12.setText("Call Srv...");
						jLabel12.setBounds(1155, 172, 77, 15);
					}
					{
						jLabel13 = new JLabel();
						jPanel1.add(jLabel13);
						jLabel13.setText("<-------");
						jLabel13.setBounds(1155, 554, 70, 15);
					}
					{
						jLabel14 = new JLabel();
						jPanel1.add(jLabel14);
						jLabel14.setText("...got Response");
						jLabel14.setBounds(1143, 539, 95, 15);
					}
					jLabel2.setBounds(622, 12, 515, 15);
					jLabel2.setText("Secured Request:");
					jScrollPane1.setBounds(24, 33, 500, 300);
					jScrollPane1.setAutoscrolls(true);
					{
						jTextArea1 = new JTextArea();
						jScrollPane1.setViewportView(jTextArea1);
						//jTextArea1.setFocusable(false);
						jTextArea1.setBounds(26, 33, 500, 300);
						jTextArea1.setEditable(true);
					}
					jLabel4.setBounds(623, 393, 514, 15);
					jTextArea2.setBounds(624, 35, 500, 300);
					jTextArea4.setBounds(624, 415, 500, 300);
					jTextArea3.setBounds(24, 413, 500, 300);
					jLabel3.setText("Client Response:");
					jLabel3.setBounds(24, 392, 500, 15);
				}
			}
//			pack();
			this.setSize(1254, 776);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public JTextArea getJTextArea1() {
		return jTextArea1;
	}

	public JTextArea getJTextArea2() {
		return jTextArea2;
	}

	public JTextArea getJTextArea3() {
		return jTextArea3;
	}

	public JTextArea getJTextArea4() {
		return jTextArea4;
	}

	public JLabel getJLabel1() {
		return jLabel1;
	}

	public JLabel getJLabel2() {
		return jLabel2;
	}

	public JLabel getJLabel3() {
		return jLabel3;
	}

	public JLabel getJLabel4() {
		return jLabel4;
	}

	public JScrollPane getJScrollPane1() {
		return jScrollPane1;
	}

	public JScrollPane getJScrollPane2() {
		return jScrollPane2;
	}

	public JScrollPane getJScrollPane3() {
		return jScrollPane3;
	}

	public JScrollPane getJScrollPane4() {
		return jScrollPane4;
	}
	


}
